﻿ 
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Demo
{
   public class ABCcs
    {
       public   ABCcs() {

           Func<int, int> fun1 = o => o + 1;
           Func<double, double> fun2 = p => p + 0.2;
           dyc.Add(1, fun1);
           dyc.Add(2, fun2);
           FUn.Add(2, fun2);
           FUn.Add(1, fun2);


       }

       public System.Reflection.Binder bin { get; set; }

       public double d(double x,int i=2) {
           var fun = dyc[i](x);
           return fun;
       }

       public object dx(double x) {
           return FUn[2](x);
            
       }

       public int x() {
           Func<int, int> fun1 = dyc[1];
           return fun1(1);
       }
       Dictionary<int, Func<double, double>> FUn = new Dictionary<int, Func<double, double>>();
 
       Dictionary<int, dynamic> dyc = new Dictionary<int, dynamic>();
    }

   public class TTTest {

       public string NewJosn(object a) {
           return Newtonsoft.Json. JsonConvert.SerializeObject(a);
       }

      

   }

}
